package com.example.worklab.floating

import android.os.Bundle
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.example.worklab.base.BaseActivity
import com.example.worklab.databinding.ActivityDragFloatviewBinding

class DragFloatActivity : BaseActivity<ActivityDragFloatviewBinding>() {
    override val bindingInflater: (LayoutInflater) -> ActivityDragFloatviewBinding
        get() = ActivityDragFloatviewBinding::inflate

    override fun initData(savedInstanceState: Bundle?) {

    }

    override fun initView(savedInstanceState: Bundle?) {

        binding.addView.setOnClickListener {
            val contentView = window.decorView.findViewById<FrameLayout>(android.R.id.content)
            contentView.addView(FloatView(this))

        }
    }
}